﻿<%@ Control Language="C#" EnableViewStatE="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<script type="text/javascript" language="javascript">
    var arrProjectInfo = new Array(); 
    function GetSelectProjectInfo()
    {
        if(document.getElementById("project_id").value=='')
        {
            alert('请选择项目!');
            return;
        }
        var returnvalue=document.getElementById("project_id").value;
        var retval=returnvalue.substring(0,returnvalue.length-1).split(',');
        window.returnValue=returnvalue.substring(0,returnvalue.length-1);
        self.close();
    }
    function setValue(obj)
    {
        var element = document.getElementsByTagName("input");
       
        if(obj.checked)
        {
       
         document.getElementById("project_id").value += obj.id+",";             
        
        }else
        {      
        document.getElementById("project_id").value= document.getElementById("project_id").value.replace(obj.id+",","");
        }
      
    }
    function setNull()
    {
        arrProjectInfo.length=0;
    }
    function GetAllSelect(){
        var element=document.getElementsByTagName("input");
        if(element.length>0)
        {
            for(var i=0;i<element.length;i++){
                if(element[i].type=='checkbox'){
                    if(element[i].checked){
                        element[i].checked=false;
                        document.getElementById("project_id").value= document.getElementById("project_id").value.replace(element[i].id+",","");
                    }else{
                        element[i].checked=true;
                        document.getElementById("project_id").value += element[i].id+",";
                    }
                    
                }
            }    
        }
    }
    </script>
<center>
        <table border="0" cellpadding="0" cellspacing="0" class="window_tab_list" style="width:450px;">
            <tr>
                <th height="30px">
                    <strong>选择<%=HttpContext.Current.Request.QueryString["userType"]%></strong>
                </th>
            </tr>
            <tr>
                <td>
                    <%=HttpContext.Current.Request.QueryString["userType"]%>名称:<asp:TextBox ID="txt_name" runat="server" Width="100"></asp:TextBox>
                    <asp:Button ID="btn_query" runat="server" SkinID="LightGreen" Text="查询" />
                </td>
            </tr>
            <tr>
                <td width="450px">
                    <CBW:CustomGridView runat="server" ID="List" SkinID="List" ShowCmpAndCancel="false" CustomGridViewClass="window_tab_list_fst"
                        ShowGridViewSelect="List" ShowHideColModel="None" PageSize="50" AllowPaging="true" Width="450px" AutoGenerateColumns="false" >
                        <Columns>
                            <asp:BoundField DataField="单位名称" HeaderText="单位名称" ItemStyle-HorizontalAlign="left"  />
                            <asp:BoundField DataField="信用等级" HeaderText="信用等级" ItemStyle-HorizontalAlign="left"  />
                        </Columns>
                    </CBW:CustomGridView>
                </td>
            </tr>
            <tr>
                <td align="center" height="30px">
                    <input type="button" id="bt_ok" value="确定" onclick="GetSelectProjectInfo();" />

                    <%--<asp:Button ID="bt_ok" runat="server" SkinID="LightGreen" Text="确定" OnClientClick="GetSelectProjectInfo();return false;" />--%>
                    <asp:Button ID="bt_cancel" runat="server" SkinID="LightGreen" Text="关闭" OnClientClick="javascript:self.close();return false;" />
                </td>
            </tr>
        </table>
    </center>
    <input type="hidden" value="" id="project_id" />